<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Business;
use App\Http\Controllers\Product;
use App\Http\Controllers\Cart;
use App\Http\Controllers\Address;
use App\Http\Controllers\Order;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::prefix('business')->group(function(){
    Route::post('index',[Business::class,'index']);
    Route::post('login',[Business::class,'login']);
    Route::post('register',[Business::class,'register']);
    Route::post('check',[Business::class,'check']);
    Route::post('profile',[Business::class,'profile']);
    Route::post('record',[Business::class,'record']);
    Route::post('recharge',[Business::class,'recharge']);
    Route::post('rechargerecord',[Business::class,'rechargerecord']);
    Route::post('emailcode',[Business::class,'emailcode']);
    Route::post('attestation',[Business::class,'attestation']);
});


Route::prefix('product')->group(function(){
    Route::post('index',[Product::class,'index']);
    Route::post('type',[Product::class,'type']);
    Route::post('tabulation',[Product::class,'tabulation']);
    Route::post('info',[Product::class,'info']);
});


Route::prefix('cart')->group(function(){
    Route::post('index',[Cart::class,'index']);
    Route::post('add',[Cart::class,'add']);
    Route::post('edit',[Cart::class,'edit']);
    Route::post('del',[Cart::class,'del']);
});


Route::prefix('address')->group(function(){
    Route::post('index',[Address::class,'index']);
    Route::post('add',[Address::class,'add']);
    Route::post('info',[Address::class,'info']);
    Route::post('edit',[Address::class,'edit']);
    Route::post('del',[Address::class,'del']);
    Route::post('check',[Address::class,'check']);
    Route::post('getcheck',[Address::class,'getcheck']);
});

Route::prefix('order')->group(function(){
    Route::post('index',[Order::class,'index']);
    Route::post('add',[Order::class,'add']);
    Route::post('info',[Order::class,'info']);
    Route::post('buynow',[Order::class,'buynow']);
    Route::post('receipt',[Order::class,'receipt']);
    Route::post('retreat',[Order::class,'retreat']);
    Route::post('express',[Order::class,'express']);
    Route::post('infoproduct',[Order::class,'infoproduct']);
    Route::post('rate',[Order::class,'rate']);
    Route::post('expresslist',[Order::class,'expresslist']);
    Route::post('refundgoods',[Order::class,'refundgoods']);
    Route::post('refundinfo',[Order::class,'refundinfo']);
});


